import React, { Component } from 'react'
import Child from './child'

export default class parent extends Component {
  state = {
    count: 20
  }
  change = val => {
    this.setState({
      count: val
    })
  }
  render () {
    return (
      <div>
        parent
        <Child count={this.state.count} callback={this.change} />
      </div>
    )
  }
}
